<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<title>CESIUM场景编辑</title>
<link rel="icon" href="#(ctx)/assets/img/favicon.ico" />
<link rel="stylesheet"
	href="#(ctx)/assets/plugins/layui-v2.5.7/layui/css/layui.css" />
<link rel="stylesheet"
	href="#(ctx)/assets/font-awesome-4.3.0/css/font-awesome.min.css" />
<link rel="stylesheet"
	href="#(ctx)/assets/plugins/Cesium/Widgets/widgets.css" />
<link rel="stylesheet"
	href="#(ctx)/assets/plugins/zTree_v3/css/zTreeStyle/zTreeStyle.css" />
<link rel="stylesheet" href="#(ctx)/assets/css/tips.css" />
<link rel="stylesheet" href="#(ctx)/assets/css/scene.css" />
</head>

<body class="layui-layout-body" oncontextmenu="return false"
	onselectstart="return false">
	<div class="layui-layout layui-layout-admin">
		<div class="layui-header">
			<span id="scene-name-span" style="color: #ff7f00;" title="点击修改场景信息">
				#(scene?scene.name:'未命名') </span>
			<ul class="layui-nav header">
				<li class="layui-nav-item"><a href="javascript:;">设置</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;" id="scene-edit-btn">场景编辑</a>
						</dd>
						<dd>
							<a href="javascript:;">场景特效</a>
						</dd>
						<dd>
							<a href="javascript:;">场景交互</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a href="javascript:;">资源</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;" id="srcOnlineMapBtn">地图服务</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addModelSceneBtn">模型库(gltf/glb)</a>
						</dd>
						<dd>
							<a href="javascript:;" id="add3dtitleModelSceneBtn">实景模型库(3ditiles)</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addVModelSceneBtn">视频融合</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a href="javascript:;">标绘</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;" id="addPointSceneBtn">点</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addRectangleSceneBtn">矩形</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addPolylineSceneBtn">折线</a>
						</dd>	
						<dd>
							<a href="javascript:;" id="addPolygonSceneBtn">多边形</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addCircleSceneBtn">圆</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addWallSceneBtn">立体墙</a>
						</dd>						
						<dd>
							<a href="javascript:;" id="addRoadLabelSceneBtn">文字标注</a>
						</dd>
					</dl>
				</li>
				<li class="layui-nav-item"><a href="javascript:;">图上量算</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;" id="addMeasureLengthBtn">空间距离</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addMeasureAreaBtn">水平面积</a>
						</dd>
						<dd>
							<a href="javascript:;" id="addMeasureTriangleBtn">三角测量</a>
						</dd>	
						<dd>
							<a href="javascript:;" id="cleanMeasureBtn">清除</a>
						</dd>
						<!-- <dd>
							<a href="javascript:;">高度测量</a>
						</dd>	
						<dd>
							<a href="javascript:;">坐标拾取</a>
						</dd>			 -->								
					</dl>
				</li>		
				<!-- <li class="layui-nav-item"><a href="javascript:;">空间分析</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;">日照分析</a>
						</dd>
						<dd>
							<a href="javascript:;">可视域分析</a>
						</dd>	
						<dd>
							<a href="javascript:;">方量分析</a>
						</dd>	
						<dd>
							<a href="javascript:;">地形开挖</a>
						</dd>	
						<dd>
							<a href="javascript:;">地表透明</a>
						</dd>						
						<dd>
							<a href="javascript:;">坡度坡向</a>
						</dd>						
						<dd>
							<a href="javascript:;">模型坡切</a>
						</dd>	
						<dd>
							<a href="javascript:;">模型压平</a>
						</dd>
						<dd>
							<a href="javascript:;">模型裁剪</a>
						</dd>
					</dl>
				</li>			 -->				
				<!-- <li class="layui-nav-item"><a href="javascript:;">工具</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;" id="addPlanBtn">预案管理</a>
						</dd>
					</dl>
				</li> -->				
				<li class="layui-nav-item"><a href="javascript:;">帮助</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="javascript:;">文档中心</a>
						</dd>
					</dl>
				</li>
			</ul>
			<div class="layui-form layui-layout-right">
				<table>
					<tr>
						<td style="padding: 2px;">
							<input type="checkbox"  lay-skin="switch" lay-filter="sceneEditSwitch" lay-text="编辑|预览" title="切换场景状态">
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div class="layui-body" id="mars3dContainer"></div>
		<!-- <div class="layui-body" id="">
			<div id="mars3dContainer" style="width:50%;"></div>
			<div id="mars2dContainer" style="width:50%;"></div>
		</div> -->
		
	</div>

	<div id="rMenu">
		<ul>
			<li id="f_edit">重命名分组</li>
			<li id="f_del">删除分组</li>
			<li id="f_view">设置视角</li>
			<li id="t_group">添加组</li>
			<li id="m_del">删除</li>
			<li id="m_edit">修改</li>
			<li id="p_edit">重命名</li>
			<li id="p_view">预览</li>
			<li id="p_pend">暂停</li>
			<li id="p_stop">停止</li>
			<li id="p_config">修改</li>
			<li id="p_del">删除预案</li>
		</ul>
	</div>
<script id="sceneMouseRMScript" type="text/html">
	<div class="scene-contextmenu"
		style="display: block; width: 132px; height: 188px;">
		<ul class="scene-contextmenu-ul"
			id="sceneContainer-scene-contextmenu-ul">
			<li class="contextmenu-item " data-index="159"><a
				href="javascript:void(0)"><i class="fa fa-info-circle"></i>查看此处坐标</a>
			</li>
			<li class="contextmenu-item" data-index="160"><a
				href="javascript:void(0)"><i class="fa fa-camera-retro"></i>查看当前视角</a>
			</li>
			<li class="contextmenu-item" data-index="165"><a
				href="javascript:void(0)"><i class="fa fa-street-view"></i>视角切换&nbsp;&nbsp;<i
					class="fa fa-caret-right"></i></a>
				<ul class="scene-contextmenu-ul scene-sub-menu"
					style="left: 135px; ">
					<li class="contextmenu-item" data-index="161"><a
						href="javascript:void(0)"><i class="fa fa-retweet"></i>绕此处环绕飞行</a>
					</li>
					<li class="contextmenu-item" data-index="162"><a
						href="javascript:void(0)"><i class="fa fa-send-o"></i>移动到此处</a></li>
					<li class="contextmenu-item" data-index="163"><a
						href="javascript:void(0)"><i class="fa fa-male"></i>第一视角站到此处</a></li>
					<li class="contextmenu-item" data-index="164"><a
						href="javascript:void(0)"><i class="fa fa-keyboard-o"></i>开启键盘漫游</a>
					</li>
				</ul></li>
			<li class="contextmenu-item" data-index="172"><a
				href="javascript:void(0)"><i class="fa fa-eyedropper"></i>图上标记&nbsp;&nbsp;<i
					class="fa fa-caret-right"></i></a>
				<ul class="scene-contextmenu-ul scene-sub-menu"
					style="left: 135px; display: none;">
					<li class="contextmenu-item" data-index="166"><a
						href="javascript:void(0)"><i class="fa fa-map-marker"></i>标记点</a>

					</li>
					<li class="contextmenu-item" data-index="167"><a
						href="javascript:void(0)"><i class="fa fa-reorder"></i>标记线</a></li>
					<li class="contextmenu-item" data-index="168"><a
						href="javascript:void(0)"><i class="fa fa-medium"></i>标记面</a></li>
					<li class="contextmenu-item" data-index="169"><a
						href="javascript:void(0)"><i class="fa fa-genderless"></i>标记圆</a>

					</li>
					<li class="contextmenu-item" data-index="170"><a
						href="javascript:void(0)"><i class="fa fa-retweet"></i>标记矩形</a></li>
					<li class="contextmenu-item" data-index="171"><a
						href="javascript:void(0)"><i class="fa fa-pencil"></i>允许编辑</a></li>
				</ul></li>
			<li class="contextmenu-item" data-index="179"><a
				href="javascript:void(0)"><i class="fa fa-rss"></i>特效效果&nbsp;&nbsp;<i
					class="fa fa-caret-right"></i></a>
				<ul class="scene-contextmenu-ul scene-sub-menu"
					style="left: 135px; display: none;">
					<li class="contextmenu-item" data-index="173"><a
						href="javascript:void(0)"><i class="fa fa-ticket"></i>开启泛光</a></li>
					<li class="contextmenu-item" data-index="174"><a
						href="javascript:void(0)"><i class="fa fa-trello"></i>开启亮度</a></li>
					<li class="contextmenu-item" data-index="175"><a
						href="javascript:void(0)"><i class="fa fa-dashboard"></i>开启夜视</a>

					</li>
					<li class="contextmenu-item" data-index="176"><a
						href="javascript:void(0)"><i class="fa fa-star-half-full"></i>开启黑白</a>

					</li>
					<li class="contextmenu-item" data-index="177"><a
						href="javascript:void(0)"><i class="fa fa-delicious"></i>开启马赛克</a>

					</li>
					<li class="contextmenu-item" data-index="178"><a
						href="javascript:void(0)"><i class="fa fa-simplybuilt"></i>开启景深</a>

					</li>
				</ul></li>
			<li class="contextmenu-item" data-index="185"><a
				href="javascript:void(0)"><i class="fa fa-gear"></i>场景设置&nbsp;&nbsp;<i
					class="fa fa-caret-right"></i></a>
				<ul class="scene-contextmenu-ul scene-sub-menu"
					style="left: 135px; display: none;">
					<li class="contextmenu-item" data-index="180"><a
						href="javascript:void(0)"><i class="fa fa-eye-slash"></i>开启深度监测</a>

					</li>
					<li class="contextmenu-item" data-index="181"><a
						href="javascript:void(0)"><i class="fa fa-moon-o"></i>关闭星空背景</a></li>
					<li class="contextmenu-item" data-index="182"><a
						href="javascript:void(0)"><i class="fa fa-sun-o"></i>开启日照阴影</a></li>
					<li class="contextmenu-item" data-index="183"><a
						href="javascript:void(0)"><i class="fa fa-soundcloud"></i>关闭大气渲染</a>

					</li>
					<li class="contextmenu-item" data-index="184"><a
						href="javascript:void(0)"><i class="fa fa-download"></i>场景截图</a></li>
				</ul></li>
		</ul>
	</div>
	</script>


	<script type="text/javascript" src="#(ctx)/assets/js/jquery.min.js"></script>
	<script type="text/javascript" src="#(ctx)/assets/js/ajax.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/layui-v2.5.7/layui/layui.all.js"></script>
	<script type="text/javascript" src="#(ctx)/assets/js/canvas2image.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/zTree_v3/js/jquery.ztree.all.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/Cesium/Cesium.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/imagery/cesiumTdt.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/CesiumEcefLlhEnu.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/turf/turf.min.js"></script>
	
	<script type="text/javascript"
		src="#(ctx)/assets/libs/rtc/request.min.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/libs/rtc/webrtcstreamer.js"></script>

	<script type="text/javascript" src="#(ctx)/assets/plugins/VFG/VFG.js"></script>
	<script type="text/javascript" src="#(ctx)/assets/plugins/VFG/Components/WallMaterialProperty.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/imagery/TiandituImageryProvider.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/imagery/CommonImageryProvider.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/util/Render.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/util/Util.js"></script>

	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/controls/OrbitControls.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/model/PModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/model/TModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/model/VModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/model/EModel.js"></script>

	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/enity/ERoadMark.js"></script>

	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/point/PPoint.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/enity/EPolyline.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/enity/EWall.js"></script>			
		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/listener/Listener.js"></script>		

	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditPModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditVModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditTModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditRoadMark.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditPPoint.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/edit/EditEPolyline.js"></script>			
		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawPModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawVModel.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawRoadMark.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawPPoint.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawRectangle.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawPolyline.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawPolygon.js	"></script>			
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawCircle.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/draw/DrawWall.js"></script>
		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/measure/MeasureLength.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/measure/MeasureArea.js"></script>	
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/measure/MeasureTriangle.js"></script>			

	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/roam/PlanRoam.js"></script>
		
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/CesiumGeometry.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/Tip.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/Event.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/plugins/VFG/Components/Popup.js"></script>

	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/Header.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/Scene.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneEvent.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/ScenePopup.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneLayer.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneOnlineMap.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneModelLibrary.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/Scene3dtitle.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneVideoFusion.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneUtil.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneRoadMark.js"></script>
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneMouseRM.js"></script>

	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/ScenePointLibrary.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/ScenePlotLibrary.js"></script>		
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/ScenePolylineLibrary.js"></script>			
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/SceneWallLibrary.js"></script>	
	<script type="text/javascript"
		src="#(ctx)/assets/js/scene/assembly/ScenePlanLibrary.js"></script>

	<script type="text/javascript" src="#(ctx)/assets/js/scene/main.js"></script>
	<script type="text/javascript">
		var layer,element,form,laytpl,table,upload,slider,colorpicker,treeSelect,sceneEditor,laypage,cropper,WEBSOKET_URL;
		layui.extend({
		    treeSelect: '#(ctx)/assets/plugins/layui-v2.5.7/layui/modules/treeSelect/treeSelect',
		    cropper: '#(ctx)/assets/plugins/layui-v2.5.7/layui/modules/cropper/cropper',
		}).use(['layer', 'element','laytpl','upload','colorpicker','table','treeSelect','slider','util','form','laypage','cropper'], function (e) {
			var $ = layui.jquery;
		    layer = layui.layer;
		    element = layui.element;
		    form= layui.form;
		    laytpl=layui.laytpl;
		    table=layui.table;
		    slider=layui.slider;
		    colorpicker=layui.colorpicker;
		    upload=layui.upload;
		    laypage=layui.laypage;
		    treeSelect=layui.treeSelect;
		    cropper=layui.cropper;
		    
			let protocol=window.location.protocol
			let host=window.location.host;
			
		    
		    $(document).ready(function () {
		      layer.load(2);
		      initEditor({
		    	  sceneId:'#(scene?scene.id:'')',
		    	  ctx:protocol+'//'+host+'#(ctx)'
		      });
		      layer.closeAll('loading');
		    })
		    
		});
    </script>
</body>

</html>